<?php
namespace Sys\Controller;
use Todo\Controller\BackendController;

/**
 * Class UserController 用户信息
 * @package Sys\Controller
 */
class UserController extends BackendController {

    /**
     * 获取要编辑的数据，建议重写
     * @param $id
     * @return mixed
     */
    protected function _editData($id){
        $this->_loadModel();
        $info = $this->_model->keyFind($id);
        if($info){
            $info['identity_id'] = $this->_model->getUserIdenIds($info['id']);
            $info['role_id'] = $this->_model->getUserRoleIds($info['id']);
        }
        return $info;
    }

    public function password(){
        $this->assign('vo', $this->_user);
        $this->display();
    }
}